#include "WOH_Equipment.h"
#include <assert.h>

CEquipment::CEquipment(void)
{
	m_pMatBindFrame = NULL;
	weaponstate=1;
}

CEquipment::~CEquipment(void)
{
}

bool CEquipment::Initialize( LPDIRECT3DDEVICE9 pDevice,
							LPCTSTR szMeshFileName,
							D3DXMATRIX* pMatBindFrame )
{
	if (!m_Mesh.LoadXFile(szMeshFileName,pDevice))
	{
		LOG::Instance()->OutputError("Failed to LoadXFile(szMeshFileName,pDevice)");
		return false;
	}
	m_pMatBindFrame = pMatBindFrame;
	LOG::Instance()->OutputSuccess("Equipment Initiation Successful");
	return true;
}

void CEquipment::Clearup()
{
	m_Mesh.Clearup();
}

void CEquipment::Render(LPDIRECT3DDEVICE9 pDevice)
{
	pDevice->SetTransform(D3DTS_WORLD,m_pMatBindFrame);
	m_Mesh.Draw(pDevice);
}